package io.jt808.multiService;

import org.springframework.data.redis.connection.RedisConnectionFactory;
import org.springframework.data.redis.core.RedisTemplate;
import org.springframework.data.redis.serializer.RedisSerializer;
import org.springframework.data.redis.serializer.StringRedisSerializer;

public class PackageItemTemplate extends RedisTemplate<String, PackageItem> {
    public PackageItemTemplate() {
        RedisSerializer stringSerializer = new StringRedisSerializer();
        setKeySerializer(stringSerializer);
    }

    public PackageItemTemplate(RedisConnectionFactory connectionFactory) {
        this();
        setConnectionFactory(connectionFactory);
        afterPropertiesSet();
    }
}
